<template>
    <component :key="nodeData.nodeId" :data="nodeData" :is="currComponent"></component>
</template>

<script setup>
    
    import {ref, toRefs, watch, defineComponent, computed} from 'vue';
    import UserConfig from './userConfig.vue'
    import StartConfig from './startConfig.vue'
    import SerialConfig from './serialConfig.vue'
    // defineComponent({
    //     components: {Testa, Testb, Testc}
    // })
    const props = defineProps({
        type: String,
        nodeData:{},
    })
    const {nodeData} = toRefs(props);
    const currComponent = ref();
    const type = nodeData.value.nodeType;
    if(type == 'user' || type == 'parallel-node'){
        currComponent.value = UserConfig
    }else  if(type == 'start'){
        currComponent.value = StartConfig
    }else  if(type == 'serial-node'){
        currComponent.value = SerialConfig
    }else {
        // currComponent.value = Testc;
    }

    
</script>

<style scoped>
    .flow-setting-container-aa{
        display: inline-block;
        box-sizing: border-box;
        /* border: 1px solid tomato; */
        padding: 10px;
    }
</style>